//
//  GCUserTableViewCell.m
//  GoldChampion
//
//  Created by stoneobs on 2018/5/17.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "MCFriendTableViewCell.h"

@interface MCFriendTableViewCell()
@property(nonatomic, strong) UIImageView              *iconImageView;

@end
@implementation MCFriendTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 60;
}
#pragma mark --subView
- (void)configSubView{
    self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, 50, 50)];
    self.iconImageView.layer.cornerRadius = 25;
    self.iconImageView.clipsToBounds = YES;
    self.iconImageView.centerY = self.class.cellHeight/2;
    self.iconImageView.image = [UIImage imageNamed:@"reba1"];
    [self addSubview:self.iconImageView];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconImageView.right + 10, 0, 200, self.class.cellHeight)
                                                     text:@"dsdas"
                                                textColor:FirstTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    [self addSubview:titleLable];
    self.nameLable = titleLable;
}
- (void)setUser:(MCUserModel *)user{
    _user = user;
    
    [self.iconImageView sd_setImageWithURL:MCRealImageUrl(user.user_icon) completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {

    }];
    self.nameLable.text = user.user_nick;
}
@end


